package xin.marcher.module.inventory.service;

import xin.marcher.module.common.core.JsonResult;
import xin.marcher.module.inventory.domain.request.InventoryQueryRequest;
import xin.marcher.module.inventory.domain.request.InventoryRequest;
import xin.marcher.module.inventory.domain.request.WarningInventoryRequest;
import xin.marcher.module.inventory.domain.response.InventoryResponseDTO;

import java.util.List;

/**
 * 库存扣减接口
 *
 *
 */
public interface InventoryService {

    /**
     * 扣减商品库存
     *
     * @param request
     */
    JsonResult deductProductStock(InventoryRequest request);

    /**
     * 取消订单 回退商品库存
     *
     * @param request
     */
    JsonResult cancelProductStock(InventoryRequest request);

    /**
     * 库存预警消息通知
     *
     * @param request
     */
    void warningInventoryMessage(WarningInventoryRequest request);

    /**
     * 查询卖家 商品库存信息
     *
     * @param queryRequest
     * @return
     */
    List<InventoryResponseDTO> queryInventoryList(InventoryQueryRequest queryRequest);

}
